import 'package:flutter_ducafecat_news/base/base_mvp_view.dart';

import 'base_intercept.dart';
class ShowLoadingIntercept extends BaseIntercept {
  ShowLoadingIntercept(BaseMvpView iTopView,
      {bool isDefaultFailure = true}) {
    this.iTopView = iTopView;
    this.isDefaultFailure = isDefaultFailure;
  }
  @override
  void afterRequest() {
    if (iTopView != null) {
      iTopView.dismissLoading();
    }
  }
  @override
  void beforeRequest() {
    if (iTopView != null) {
      iTopView.showLoading("加载中...");
    }
  }
}
